using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Grid Layout</para>
    /// <para>Adds the Grid Layout algorithm to the list of layouts to be automatically chained at the end of the building of diagrams based on a given template. This tool also presets the Grid Layout algorithm parameters for any diagram based on that template.</para>
    /// <para>将“网格布局”算法添加到布局列表中，以便在基于给定模板构建逻辑示意图结束时自动链接。此工具还为基于该模板的任何逻辑示意图预设了网格布局算法参数。</para>
    /// </summary>    
    [DisplayName("Add Grid Layout")]
    public class AddGridLayout : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddGridLayout()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public AddGridLayout(object _in_utility_network, object _template_name, _is_active_value _is_active)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Grid Layout";

        public override string CallName => "nd.AddGridLayout";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _are_containers_preserved.GetGPValue(), _cell_width_absolute, _cell_height_absolute, _out_utility_network, _out_template_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Preserve container layout</para>
        /// <para><xdoc>
        ///   <para>Specifies how the algorithm will process containers.
        ///   <bulletList>
        ///     <bullet_item>Checked—The layout algorithm will execute on the top graph of the diagram so containers are preserved.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The layout algorithm will execute on both content and noncontent features in the diagram. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定算法将如何处理容器。
        ///   <bulletList>
        ///     <bullet_item>选中 - 布局算法将在逻辑示意图的顶部图形上执行，以便保留容器。</bullet_item><para/>
        ///     <bullet_item>未选中 - 布局算法将对逻辑示意图中的内容要素和非内容要素执行。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve container layout")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _are_containers_preserved_value _are_containers_preserved { get; set; } = _are_containers_preserved_value._false;

        public enum _are_containers_preserved_value
        {
            /// <summary>
            /// <para>PRESERVE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_CONTAINERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_CONTAINERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Cell Width</para>
        /// <para>The width of each grid cell. The default is 2 in the units of the diagram's coordinate system.</para>
        /// <para>每个网格像元的宽度。默认值为 2，以逻辑示意图坐标系为单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Width")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _cell_width_absolute { get; set; } = "2 Unknown";


        /// <summary>
        /// <para>Cell Height</para>
        /// <para>The height of each grid cell. The default is 2 in the units of the diagram's coordinate system.</para>
        /// <para>每个网格像元的高度。默认值为 2，以逻辑示意图坐标系为单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _cell_height_absolute { get; set; } = "2 Unknown";


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        public AddGridLayout SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}